package cn.zzuli.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date: 2020/12/24 20:36
 * @Author: 绯色下午茶
 * @Description:
 */
@RestController
@RequestMapping("/config")
//支持动态刷新功能
@RefreshScope
public class NacosConfigController {
    @Value("${config.info}")
    private String info;

    @GetMapping("/info")
    public String getConfigInfo(){
        return info;
    }
}

